//package com.tduck.cloud.api.config;
//import com.tduck.cloud.message.websocket.WebSocketHandler;
//import com.tduck.cloud.message.websocket.WebSocketInterceptor;
//import lombok.RequiredArgsConstructor;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.web.socket.config.annotation.EnableWebSocket;
//import org.springframework.web.socket.config.annotation.WebSocketConfigurer;
//import org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry;
//
///**
// * Websocket配置类
// *
// * @author tduck
// */
//@Configuration
//@EnableWebSocket
//@RequiredArgsConstructor
//public class WebSocketConfig implements WebSocketConfigurer {
//
//    private final WebSocketHandler webSocketHandler;
//    private final WebSocketInterceptor webSocketInterceptor;
//
//    @Override
//    public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) {
//        registry.addHandler(webSocketHandler, "/websocket")
//                .addInterceptors(webSocketInterceptor)
//                .setAllowedOrigins("*");
//    }
//}
//
//
